package org.openscheduler.modules.scheduler;

import java.util.Date;

import org.quartz.SchedulerException;
import org.quartz.SchedulerMetaData;

public class SchedulerMetaDataWrapper {

	private SchedulerMetaData metaData;
	
	public SchedulerMetaData getMetaData() {
		return metaData;
	}

	public SchedulerMetaDataWrapper(SchedulerMetaData metaData) {
		if (metaData == null) {
			throw new IllegalArgumentException("SchedulerMetaData is null");
		}
		this.metaData = metaData;
	}
	
	public String getSchedulerName() {
		return metaData.getSchedulerName();
	}
	
	public String getSchedulerInstanceId() {
		return metaData.getSchedulerInstanceId();
	}
	
	public Class<?> getSchedulerClass() {
        return metaData.getSchedulerClass();
    }
	
    public String getSchedulerClassName() {
        return metaData.getSchedulerClass().getName();
    }

    public Date getRunningSince() {
        return metaData.getRunningSince();
    }
    
    public int getNumberOfJobsExecuted() {
        return metaData.getNumberOfJobsExecuted();
    }

    public boolean getIsSchedulerRemote() {
        return metaData.isSchedulerRemote();
    }
    
    public boolean getIsStarted() {
        return metaData.isStarted();
    }
    
    public boolean getIsInStandbyMode() {
        return metaData.isInStandbyMode();
    }

    public boolean getIsShutdown() {
        return metaData.isShutdown();
    }

    public Class<?> getJobStoreClass() {
        return metaData.getJobStoreClass();
    }
    
    public String getJobStoreClassName() {
        return metaData.getJobStoreClass().getSimpleName();
    }
    
    public boolean getIsJobStoreSupportsPersistence() {
        return metaData.isJobStoreSupportsPersistence();
    }
    
    public boolean getIsJobStoreClustered() {
        return metaData.isJobStoreClustered();
    }

    public Class<?> getThreadPoolClass() {
        return metaData.getThreadPoolClass();
    }
    
    public int getThreadPoolSize() {
        return metaData.getThreadPoolSize();
    }
    
    public String getVersion() {
        return metaData.getVersion();
    }

	public String getSummary() throws SchedulerException {
		return metaData.getSummary();
	}

}
